/*
 * CustomNotification.h
 *
 *  Created on: Apr 17, 2017
 *      Author: zhangjf
 */

#ifndef INCLUDE_CUSTOMNOTIFICATION_H_
#define INCLUDE_CUSTOMNOTIFICATION_H_

#include <Poco/Notification.h>

using namespace Poco;

#include "SUID.h"

namespace util
{

class CustomNotificationBase : public Notification
{
public:
	CustomNotificationBase()
	: _source()
	, _target()	{}

	const SUID& getSource() const
	{
		return _source;
	}

	const SUID& getTarget() const
	{
		return _target;
	}

	void setSource(const SUID& source)
	{
		_source = source;
	}

	void setTarget(const SUID& target)
	{
		_target = target;
	}

private:
	SUID _source;
	SUID _target;
};

template<typename C>
class CustomNotification : public CustomNotificationBase
{
public:
	CustomNotification(const C& custom)
	: _custom(custom) {}

	const C& custom() const
	{
		return _custom;
	}

protected:
	~CustomNotification(){};

private:
	const C _custom;
};

} /* namespace global */



#endif /* INCLUDE_CUSTOMNOTIFICATION_H_ */
